<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>员工管理</title>
    <%@include file="/static/common/common.jsp"%>
    <%--引用e--%>
    <script type="text/javascript" src="/static/js/plugins/jquery-easyu/jquery.edatagrid.js"></script>
    <script type="text/javascript" src="/static/js/plugins/jquery-form/jquery.form.min.js"></script>

    <script type="text/javascript" src="/static/js/system/layout/staff1.js"></script>
    <script type="text/javascript">
        $(function(){
            $("#pic_form").ajaxForm(function(data){
                if (data.success) {

                    $.messager.alert('温馨提示',"上传成功");
                    /*刷新页面*/
                    $("#easyui_tabs").tabs('getTab', "身份证图片").panel("refresh");

                }else {
                    $.messager.alert('温馨提示', data.msg);
                }

            });
        });



    </script>
</head>
<body>

<table id="staff_datagrid"></table>
<div id="tb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="add">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" id="btn_change"
       data-cmd="remove">删除</a>
    <!--高级查询-->
    工号: <input type="number" class="easyui-textbox" name="identifier" prompt="请输入工号"/>
    姓名: <input type="text" class="easyui-textbox" name="username"
               prompt="请输入姓名/真实名"/>
    聘用类型: <input class="easyui-combobox" id="engage" name="engage" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=8',
                                        valueField: 'id',
                                        editable:false,
                                        textField: 'name'
                                       "/>
    职务: <input class="easyui-combobox" id="business" name="business" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=9',
                                        valueField: 'id',
                                         editable:false,
                                        textField: 'name'
                                       "/>
    <a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
       data-cmd="query">查询</a><br>

</div>
<div id="ed">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="add1">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit1">编辑</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" data-cmd="remove1">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reloade1">保存</a>
</div>
<div id="staff_dialog">
    <div id="easyui_tabs" class="easyui-tabs">
        <div title="基本信息" style="padding:10px">

    <form id="staff_form" method="post" style="padding: 40px 0px 0px 30px;">
        <table style="border-collapse: separate;border-spacing: 10px;">
            <input type="hidden" id="empId" name="id"/>
            <tr>
                <td>
                    个人工号: <input type="number" class="easyui-textbox"  name="identifier"
                                 prompt="请输入工号"/>
                </td>
                <td>
                    部门: <input class="easyui-combobox" name="dept.id"  data-options="
                                        url:'/department/queryDepts',editable:false,
                                        valueField: 'id',
                                        textField: 'name'
                                       "/>
                </td>
                <td>
                    政治面貌: <input class="easyui-combobox"  name="politicalStatus.id" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=7',
                                        valueField: 'id',
                                        editable:false,
                                        textField: 'name'
                                       "/>
                </td>
            </tr>
            <tr>
                <td>
                    账号: <input type="text" class="easyui-textbox"
                                 name="username"/>
                </td>
                <td>
                    岗位: <input class="easyui-combobox" name="position.id" required lay-verify="required" data-options="
                                        url:'/position/selectAll',
                                        valueField: 'id',
                                        editable:false,
                                        textField: 'name'
                                       "/>
                </td>
                <td>
                    聘用类型: <input class="easyui-combobox" required lay-verify="required" name="engage.id" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=8',
                                        valueField: 'id',
                                        editable:false,
                                        textField: 'name'
                                       "/>
                </td>
            </tr>
            <tr>
                <td>
                    联系电话: <input type="text" class="easyui-textbox"  name="tel"/>
                </td>
                <td>
                    职务: <input class="easyui-combobox" required lay-verify="required" name="business.id" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=9',
                                        valueField: 'id',
                                        editable:false,
                                        textField: 'name'
                                       "/>
                </td>
                <td>
                    出生日期: <input class="easyui-datebox"  name="bornDate"/>
                </td>
            </tr>
            <tr>
                <td>
                    个人年龄: <input type="text" class="easyui-textbox"  name="age"/>
                </td>

                <td>
                    入职日期: <input class="easyui-datebox"  name="hireDate"/>
                </td>
                <td>
                    真实姓名: <input class="easyui-textbox"  name="realname"/>
                </td>
            </tr>
            <tr>
                <td>
                    个人工龄: <input type="text" class="easyui-textbox"  name="seniority"/>
                </td>

                <td>
                    性别: <input class="easyui-combobox" required lay-verify="required" name="gender" data-options="
                                         valueField: 'value',
                                         editable:false,
                                        textField: 'text',
                                        data: [{
                                        text: '男',
                                        value: '1'
                                        },{
                                        text: '女',
                                        value: '0'
                                       }]
                                       "/>
                </td>
                <td>
                    在职状态: <input class="easyui-combobox" required name="state" data-options="
                                        valueField: 'value',
                                        editable:false,
                                        textField: 'text',
                                        data: [{
                                        text: '离职',
                                        value: '0'
                                        },{
                                        text: '在职',
                                        value: '1'
                                       }]"/>
                </td>
            </tr>
            <tr>
                <td>
                    住房地址: <input type="text"  class="easyui-textbox" name="address"/>
                </td>
                <td>
                    考勤: <input type="text" class="easyui-textbox" required lay-verify="required" name="attendance"
                               prompt="请输入考勤卡号"/>
                </td>
                <td>
                    婚姻状态: <input class="easyui-combobox" name="married.id" data-options="
                                        url:'/systemDictionary/queryDictionaryBillByParentId?pId=11',
                                        editable:false,
                                        valueField: 'id',
                                        textField: 'name'
                                       "/>
                </td>
            </tr>
            <tr>
                <td>
                    管理员: <input class="easyui-combobox" name="admin" data-options="
                                valueField: 'value',
                                textField: 'text',
                                data: [{
                                    text: '否',
                                    value: '0'
                                },{
                                    text: '是',
                                    value: '1'
                                }]"/>
                </td>
                <td>
                    身份证号: <input type="text" class="easyui-textbox" required lay-verify="required" name="identityNumber"/>
                </td>


                <td>
                    员工角色: <input class="easyui-combobox" id="roles_combobox" required lay-verify="required" name="roles.id" data-options="
                                        url:'/role/queryRoles',
                                        valueField: 'id',
                                        textField: 'name',
                                        multiple : true
                                       "/>
                </td>
            </tr>
        </table>
    </form>
            <%--第一个标签结束--%>
            </div>
        <%--第二个标签开始--%>
        <div id="div_staff_salary" title="工资信息" style="padding:10px">

            <form  id="salary_form" method="post" >
            <table style="margin: 20px ;border-collapse:separate; border-spacing:0px 10px;">
                <tr>
                    <td>
                        银行卡卡号: <input type="text" editable="false" class="easyui-textbox"
                                      name="bankcardNumber"/>
                    </td>
                    <td>
                        工作天数: <input type="text" editable="false" class="easyui-textbox"
                                     name="workday"/>
                    </td>
                    <td>
                        基本工资: <input type="text" editable="false" class="easyui-textbox"
                                     name="baseSalary"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        五险总金额: <input type="text" editable="false" class="easyui-textbox"
                                      name="socialInsurance"/>
                    </td>
                    <td>
                        奖金: <input type="text" editable="false" class="easyui-textbox" name="bonus"/>
                    </td>
                    <td>
                        加班补贴: <input type="text" editable="false" class="easyui-textbox"
                                     name="overtime"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        住房公积金: <input type="text" editable="false" class="easyui-textbox"
                                      name="accumulationFund"/>
                    </td>

                    <td>
                        本月月份: <input type="text" editable="false" class="easyui-textbox" name="month"/>
                    </td>
                    <td>
                        迟到天数: <input type="text" editable="false" class="easyui-textbox"
                                     name="lateDay"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        个人所得税: <input type="text" editable="false" class="easyui-textbox"
                                      name="personalIncome"/>
                    </td>
                    <td>
                        奖金系数: <input type="text" editable="false" class="easyui-textbox"
                                     name="coefficient"/>
                    </td>
                    <td>
                        实发工资: <input type="text" editable="false" class="easyui-textbox"
                                     name="realWages"/>
                    </td>
                </tr>
            </table>
            </form>
           <%--第二个结束--%>
            </div>
            <%--第三个标签开始--%>
        <div title="家庭情况" style="padding:10px">
            <%--设置一个datagrid--%>
            <table id="edata_grid"></table>
            <%--第三个结束--%>
        </div>
            <%--第四个标签开始--%>
        <div title="身份证图片" style="padding:10px">
            <form id="pic_form" method="post"  action="/employee/uploadPic" enctype="multipart/form-data">
                <table style="margin: 20px ;border-collapse:separate; border-spacing:0px 10px;">
                    <tr >
                        <input type="hidden" id="empPicId" name="empId"/>
                        <input name="pic" type="file">选择文件</input>

                    </tr>
                    <tr>

                <input type="submit" value="上传身份证信息" ></input>
                    </tr>

                    <tr>

                    </tr>
                </table>
                    <img id="pic" alt="身份证" src="/upload/129a95d4-4b0f-464c-8614-d58db262edac.png" width="400px" height="300">


            <%--第四个标签结束--%>
        </div>
        <%--文件上传的表单--%>
        </form>



        <%--选项卡--%>
        </div>
        <%--表单--%>

    <%--datagride--%>
</div>
<div id="bb">
    <a href="#" class="easyui-linkbutton" iconCls="icon-save" data-cmd="save">保存</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" data-cmd="cancel">关闭</a>
</div>
</body>
</html>
